public class Cuboid extends Rectangle{
    private double heigth;  // 增加高
    //计算长方体的体积
    public double volume(){
        return super.area()*heigth;
    }
    // 创建构造方法
    public Cuboid() {
    }

    public Cuboid(double longth, double width, double heigth) {
        super(longth, width);
        this.heigth = heigth;
    }
}
